package com.yunxiao.cloud.job.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yunxiao.cloud.job.entity.ScheduleJob;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 定时任务 Mapper 接口
 * </p>
 *
 * @author yunxiao
 * @since 2020-01-09
 */
@Mapper
public interface ScheduleJobMapper extends BaseMapper<ScheduleJob> {

    /**
     * 根据条件获取任务列表
     * @param scheduleJob
     * @return
     */
    List<ScheduleJob> selectByCondition(ScheduleJob scheduleJob);

    /**
     * 获取任务信息
     * @param jobId
     * @return
     */
    ScheduleJob selectByJobId(String jobId);

    /**
     * 根据jobId删除
     * @param jobId
     * @return
     */
    int deleteByJobId(String jobId);
}
